﻿<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="MainForm.aspx.cs"  Inherits="WF.Web.MainForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>上海中原流程审批系统</title>
    <link href="css/main.css" type="text/css" rel="stylesheet" />
    <link href="css/ui.tabs.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="Scripts/jquery.js"></script>
    <script type="text/javascript" src="Scripts/ui.tabs.pack.js"></script>
    <script type="text/javascript" src="Scripts/Common.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#container-1 ul').tabs();
        });
        window.parent.scrollTo(0, 0);
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="container">
        <div class="path">当前位置：流程审批系统 &gt; 首页<input type="hidden" id="hidIsRebind" name="hidIsRebind" />            
            <a href="#" onclick="document.location.href=document.location">刷新</a></div>        
        <div class="dataGrid">
            <div class="ititle">
                <h4>流程申请</h4>
            </div>
            <div class="imgRequest">
              <dl>
                <dt><a href="#" onclick="return ShowDialog('pages/WorkFlow/KQ/KQApply.aspx', 650, 450, '');"><img src="images/person_01.gif" title="我要申请" /></a></dt>
                <dd><a href="#" onclick="return ShowDialog('pages/WorkFlow/KQ/KQApply.aspx', 650, 450, '');">考勤申请</a></dd>
              </dl>
            </div>
        </div>
         <div class="blank10">
        </div>
        <div class="dataGrid newsList">
            <div class="ititle">
                <h4>我的待办事项</h4>
            </div>
            <%--<ul class="list">
                <li><a href="#">待办事项001</a></li>
                <li><a href="#">待办事项001</a></li>
                <li><a href="#">待办事项001</a></li>                
            </ul>--%>
        <div class="dataGrid1">&nbsp;
              <asp:ListView ID="dataListView" runat="server" DataSourceID="" DataKeyNames="WorkListID,ProcInstID,URL,SN,Status"
        EnableModelValidation="true" >
        <LayoutTemplate>
            <table cellspacing="0" class="Grid">
                <tr>
                    <th width="12%">
                        流程名称
                    </th>
                    <th width="10%">
                        申请时间
                    </th>
                    <th width="38%">
                        申请内容
                    </th>
                    <th width="8%">
                        当前步骤
                    </th>                        
                    <th width="12%">
                        当前审批者
                    </th>
                    <th width="5%">
                        处理
                    </th>
                    <th width="5%">
                        流程图
                    </th>
                    <th width="5%">
                        释放
                    </th>                                         
                </tr>
                <asp:PlaceHolder ID="itemPlaceHolder" runat="server" />
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <%# Eval("ProcessName")%>
                </td>
                <td>
                    <%# Eval("StartDate","{0:yyyy-MM-dd hh:mm:ss}")%>&nbsp;
                </td>                    
                <td>
                    <%# Eval("Folio")%>&nbsp;
                </td>
                <td>
                    <%# Eval("CurActivityName")%>&nbsp;
                </td>
                <td>
                    <%# Eval("OpenBy")%>&nbsp;
                </td>
                <td>
                    <asp:Button ID="Button8" runat="server" CssClass="btnAudit" OnClientClick=<%# "return ShowDialog('" + Eval("URL") + "',650,600,'status:Modal;help:no');window.location=window.location;return false;"%> />
                </td>
                <td>
                    <asp:Button ID="Button2" runat="server" CssClass="btnViewWFInfo" OnClientClick=<%# "return ShowDialog('./pages/WorkflowInfo/ShowStatusChart.aspx?ProcInstID=" + Eval("ProcInstID") + "', window.screen.width,window.screen.height, 'scroll:no');"%> ToolTip="查看流程信息"/>
                </td>
                <td>
                    <asp:Button ID="Button4" runat="server" CssClass="btnRelease" OnClientClick=<%# "if(confirm('您确定要释放该事项吗?')) {releaseByWorkItemID('" + Eval("workListID") + "');}"%> />
                </td>                                 
            </tr>
        </ItemTemplate>
        <EmptyDataTemplate>
            <ul class="list">
                <li>您暂时没有待办事项!</li>                          
            </ul>
        </EmptyDataTemplate>
    </asp:ListView>    
            </div>
            <script type="text/javascript" language="javascript">
                function OnImageClick(img, trID) {
                    var tr = document.getElementById(trID);
                    if (img.src.indexOf("minus") > 0) {
                        img.src = "./images/plus.gif";
                        tr.style.display = "none";
                    }
                    else {
                        img.src = "./images/minus.gif";
                        tr.style.display = "";
                    }
                }
                function release(K2WorkSpaceURL, SN) {
                    var vReturnValue = window.showModalDialog(K2WorkSpaceURL + "/WorkList/AddIn/release.aspx?SN=" + SN, "a", "dialogHeight:0px;dialogWidth:0px;center:yes;help:no;resizable:no;status:no;scroll:no");
                    window.parent.location = window.parent.location;
                }

                function releaseByWorkItemID(workItemID) {
                    //var vReturnValue = window.showModalDialog("/pages/workspace/Release.aspx?WorkListItemID=" + workItemID, "Release", "dialogHeight:0px;dialogWidth:0px;center:yes;help:no;resizable:no;status:no;scroll:no");
                    //window.location = window.location;
                    var vReturnValue = window.open("Pages/WorkSpace/Release.aspx?WorkListItemID=" + workItemID, "Release", "dialogHeight:0px;dialogWidth:0px;center:yes;help:no;resizable:no;status:no;scroll:no");
                    window.location = window.location;
                }
                function redirect(K2WorkSpaceURL, SN) {
                    var vReturnValue = window.showModalDialog(K2WorkSpaceURL + "/AddIn/DialogHost.aspx?scrOpt=no&Title=Redirect Worklist Item&Skin=" + K2WorkSpaceURL + '/stylesheet/mainstyle_olive.css' + "&srcStr=" + K2WorkSpaceURL + "/WorkList/AddIn/RedirectItem.aspx?SN=" + SN + "|Skin=" + 'stylesheet/mainstyle_olive.css', "a", "dialogheight:495px;dialogwidth:620px;center:yes;help:no;resizable:no;status:no;scroll:yes");
                    window.parent.location = window.parent.location;
                }
                function closewindow() {
                    window.location = window.location
                }    
</script>
            <br><br><br><br>
        </div>
    </div>
    </form>
</body>
</html>
